/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package physical_spaces.DAO;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 *
 * @author JuanSebastian
 */
public class ListControlFileDAO {
    
    
    String statement;
    public Connection conn;
    
    public ListControlFileDAO(Connection conn) {
        this.conn = conn;
    }

    public ResultSet executeStatement( String sql ) {
        
        try {
            System.out.println( sql );
            Statement statement = conn.createStatement();
            ResultSet resultSet = statement.executeQuery( sql );
            return resultSet;
        } catch (SQLException e) {
            System.out.println(e.getMessage());
            return null;
        }
    }
    
}
